-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cheribsdtest: shm hoarding tests #2210
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nwf
reviewed
Aug 28, 2024
nwf
reviewed
Aug 28, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good demonstrators. Thanks!
brooksdavis
force-pushed
the
cheribsdtest-shm-hording
branch
from
August 28, 2024 22:18
c2f3587
to
b4857a5
Compare
bsdjhb
reviewed
Aug 29, 2024
bsdjhb
reviewed
Aug 29, 2024
Add cheri_revoke_shm_anon_hoard_unmapped which: - creates and maps a shared memory object - stores a pointer to malloced memory in the mapped object - unmaps the object - frees the pointer and triggers revocation - remaps the object - checks that the stored pointer was revoked (it is not)
Add cheri_revoke_shm_anon_hoard_closed which: - creates and maps a shared memory object - stores a pointer to malloced memory in the mapped object - unmaps the object - send the shared object file descriptor to a child process - closes the file descriptor - frees the pointer and triggers revocation - receives the file descriptor back from the child process - remaps the object - checks that the stored pointer was revoked (it is not) This demostrates the futility of scanning the descriptor table for shared memory objects during revocation and the necessity to bind them to an address space. (Lest one think it's possible to walk the graph of sockets to find the graph of processes that might have a shared memory object to search, the child could be replaced by a completely independent hoarder daemon running on a unix domain socket in the file system.)
brooksdavis
force-pushed
the
cheribsdtest-shm-hording
branch
from
August 30, 2024 19:05
b4857a5
to
a9235c1
Compare
bsdjhb
approved these changes
Sep 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a couple tests for hoarding of capabilities in shared memory segments